//
//  MANLeftTableViewCell.m
//  Three
//
//  Created by 夜猫子 on 2017/3/22.
//  Copyright © 2017年 夜猫子. All rights reserved.
//

#import "MANLeftTableViewCell.h"
#import "CZAdditions.h"

#define MANColor [UIColor cz_colorWithHex:0x20c6c6]

@implementation MANLeftTableViewCell

    
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.contentView.backgroundColor = MANColor;
        [self setupUI];
    }
    return self;
}

    
- (void)awakeFromNib {
    [super awakeFromNib];
    [self setupUI];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

    
- (void)setupUI {
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.left.equalTo(self.contentView).offset(17);
        make.size.mas_equalTo(CGSizeMake(24, 24));
    }];
    
    self.textLabel.font = [UIFont systemFontOfSize:15];
    self.textLabel.textColor = [UIColor whiteColor];
    [self.textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView);
        make.centerY.equalTo(self.contentView);
        make.left.equalTo(self.imageView.mas_right).offset(8);
    }];
  
    
}
    

    
    
@end
